package org.saasplatform.apps;

import java.util.ArrayList;
import java.util.List;

public class LeadController {
	private LeadDB db;
	
	public LeadController(LeadDB db){
		this.db = db;
	}
	
	public void saveCampaign(Lead lead){
		db.store(lead);
	}
	
	public int getLeadCount(){
		return db.getLeadsNum();
	}

	public Lead loadLead(int id) {		
		return db.load(id);
	}

	public List<Lead> searchLeads(int srcId) {
		List<Lead> leads = new ArrayList<Lead>();
		leads.add(db.load(srcId));
		
		return leads;
	}
}
